home *** CD-ROM | disk | FTP | other *** search
/ Education (Super OZ Shareware) / Education (Super OZ Shareware).iso / arj / rearj.doc < prev    next >
Text File  |  1993-07-20  |  20KB  |  503 lines

  1.  
  2.      User's Manual for the REARJ archive conversion program,    April 1993
  3.  
  4.  
  5.     REARJ software and manual copyright (c) 1991-93 by Robert K Jung.
  6.     All rights reserved.
  7.  
  8.     REARJ version 2.25 release
  9.  
  10.  
  11.  
  12.      INTRODUCTION:
  13.  
  14.      REARJ is an archive conversion program designed to facilitate the
  15.      conversion of LZH, ZIP, PAK, ARC, DWC, HYP, LZS, and ZOO archives to
  16.      the ARJ format.
  17.  
  18.      Registered ARJ users can order an improved version of REARJ that
  19.      offers !listfile selection and exclusion, file date-time selection,
  20.      REARJ_SW environment variable support, skipping a conversion when
  21.      the converted archive is larger, and other features.  And more
  22.      registered REARJ enhancements will be forthcoming.
  23.  
  24.  
  25.      MAJOR FEATURES:
  26.  
  27.      Supports all major archiver programs (PAK, LHARC, PKZIP, ZOO, ARJ,
  28.      PKPAK, DWC, HYPER, LARC, LHA).
  29.  
  30.      Supports file attributes within archives.
  31.  
  32.      Supports directories within archives.
  33.  
  34.      Supports converting archives within archives (ZIPs in a ZIP).
  35.  
  36.      Ensures reliable archive conversion with a file count and total size
  37.      check.
  38.  
  39.      Supports the use of virus checkers and BBS ad removers.
  40.  
  41.      Supports recursive scanning through subdirectories.
  42.  
  43.      Optional logging of conversions.
  44.  
  45.  
  46.      ********************
  47.      * WORDS OF CAUTION:*
  48.      ********************
  49.  
  50.      If you plan to convert many archives at one time, it is STRONGLY
  51.      suggested that you make a backup of your hard disk.  This is a wise
  52.      precaution to take any time that you make major modifications to data
  53.      on your hard disk drive.
  54.  
  55.      The standard REARJ conversion DOES NOT convert any archive comments
  56.      and volume labels.  They will be lost.
  57.  
  58.      Some of the other archivers have significant bugs which can cause data
  59.      loss that REARJ cannot detect.  It is not the purpose of this document
  60.      to point out other program's shortcomings.  I suggest logging the
  61.      conversion output to a printer to facilitate checking for errors.
  62.  
  63.      If the archives you are converting will ONLY extract to absolute
  64.      paths, you must use the /w option to set the working directory to an
  65.      empty root directory such as a RAMDRIVE.  This will allow extraction
  66.      to the root.
  67.  
  68.      REARJ and the archiver executables must be located in the DOS PATH
  69.      directories.  This is due to REARJ creating and using a temporary
  70.      directory.
  71.  
  72.      If you have changed the MS-DOS switch character from "/" to another
  73.      character via an undocumented MS-DOS interrupt or the TurboC
  74.      setswitchar() function, REARJ may not work properly with the default
  75.      REARJ.CFG configuration file.
  76.  
  77.      The most thorough testing was done with ARJ as the target format and
  78.      ZIP as the original format.  In any case, you should verify that the
  79.      extract commands of your favorite archive formats in the configuration
  80.      file are correct.    The extract commands are the most important to get
  81.      right because REARJ has a built-in verification procedure to ensure
  82.      that the ADD commands executed properly.
  83.  
  84.      You should NOT set the "-t1" option for ARJ in ARJ_SW or in the
  85.      REARJ.CFG configuration file.  This may cause file size mismatches.
  86.  
  87.      Be sure you have enough disk space on your working directory to
  88.      extract the largest archive that you want to convert!!!
  89.  
  90.  
  91.      The versions of archivers tested:
  92.  
  93.      ARJ   1.00, 1.10, 2.00, 2.10, 2.20, 2.21, 2.30, current release
  94.      LHA   2.12, 2.13
  95.      PAK   2.51
  96.      PKZIP 1.10
  97.      PKPAK 3.61
  98.      ZOO   2.01, 2.10
  99.      DWC   A5.01
  100.      LARC  3.33
  101.      HYPER 2.5
  102.  
  103.  
  104.      INSTALLATION:
  105.  
  106.      Copy REARJ.EXE and REARJ.CFG to one of the DOS PATH directories.  They
  107.      do not have to be placed in the same directory.  The PATH directories
  108.      are usually set by the PATH command in your AUTOEXEC.BAT file.  At
  109.      this version of REARJ, changing its name to something else will cause
  110.      operation difficulties.
  111.  
  112.      Be sure the archiver programs (ARJ, PAK, PKZIP, PKUNZIP, etc.) and
  113.      virus scanner are installed in a DOS PATH directory!  It is STRONGLY
  114.      recommended that the REARJ.CFG be modified to use FULL PATHNAMES to
  115.      specify all archiver executables.
  116.  
  117.      This version assumes that you have the new SCAN version 80 and use
  118.      the new option /sub to scan subdirectories.  This version's
  119.      configuration file also assumes that SCAN.EXE is installed in
  120.      the directory C:\BIN.
  121.  
  122.  
  123.      OPERATION OF REARJ:
  124.  
  125.      REARJ will build a temporary directory in the current directory and
  126.      extract the archive(s) to this directory.    REARJ will then build the
  127.      target archive(s) with the files in this directory.  If the target
  128.      archiver does not support reading of hidden or system files, REARJ
  129.      will reset those bits and then re-archive the files without those
  130.      attributes.  If the original archive has directories in it, REARJ will
  131.      extract it with full paths and re-archive it with full paths if the
  132.      target archiver supports directories.  In this case, if the archiver
  133.      does not support directories, REARJ will skip converting this archive.
  134.  
  135.      If the "/a" option has been selected, REARJ will execute REARJ to
  136.      convert any internal archives of the same type to the target format.
  137.      Any "/s" option will be carried over to the recursive REARJ command.
  138.  
  139.      As an extra test, REARJ will count the files extracted from the
  140.      original archive and total their sizes.  Then REARJ will extract the
  141.      new archive and count the files and total the sizes.  If the count and
  142.      size do not match, REARJ will skip converting the archive.
  143.  
  144.      REARJ assumes that the supported archivers will pass a non-zero error
  145.      code when there is an operation failure.
  146.  
  147.  
  148.      COMMAND SYNTAX:
  149.  
  150.      REARJ [switch options] filespec(s) or wildspec(s)
  151.  
  152.      You can specify one or more filespecs on the command line.  These
  153.      filespecs can have paths and wildcards.  Up to 100 filespecs can be
  154.      accepted by REARJ.  If you specify *.* as a wildspec, REARJ will look
  155.      at all filenames, but will skip those filenames not ending in standard
  156.      archive suffixes.    If you specify the /r switch, REARJ will look for
  157.      filenames matching the filespec(s) in the current directory and all
  158.      subdirectories of the current directory.
  159.  
  160.      The switch options and filespecs can be entered in any order.  REARJ
  161.      uses the default MS-DOS switch character "/".  REARJ uses the Turbo
  162.      C++ function getswitchar() to determine the MS-DOS switch character.
  163.      If the switch character is "-", REARJ will translate any UNIX style
  164.      pathnames to MS-DOS syntax ("dir/file" to "dir\file").
  165.  
  166.  
  167.      SWITCH OPTIONS:
  168.  
  169.      /a - convert archives within archives
  170.  
  171.       This option causes REARJ to recursively execute REARJ to convert
  172.       any archives of the original type found within the original
  173.       archive (ex. ZIPs within a ZIP).  This option requires additional
  174.       memory to execute successfully.
  175.  
  176.       You may specify the type of internal archive to convert with the
  177.       "/a" option.
  178.  
  179.       Examples:  REARJ *.zip /aLZH    convert only internal LZH archives.
  180.              REARJ *.zip /a*    convert any internal archive.
  181.  
  182.       If you use the "/a*" option, you may need to also specify "/u"
  183.       because of nested archives of the target type.
  184.  
  185.      /b - execute command before extracting files
  186.  
  187.       This option is used to specify a DOS command to be executed before
  188.       extracting the original archive.
  189.  
  190.       In addition, REARJ passes the name of the original archive to
  191.       this command as a command line argument when executing it.  This
  192.       may cause a problem with DOS commands that expect no arguments.
  193.       A workaround would be to install the DOS command in a batch file.
  194.  
  195.       This feature is to allow the user to prep the environment before
  196.       extracting the archive.  This can be used to prep for archive
  197.       comments or volume labels, etc.
  198.  
  199.      /c - execute command on extracted files before counting them
  200.  
  201.       This option is used to specify a DOS command to be executed upon
  202.       the extracted files before REARJ counts them for later
  203.       verification.  This is to allow executing a DOS or batch command
  204.       to clean up the extracted files (remove BBS advertisements, etc).
  205.       REARJ does not check for any returned error code from the
  206.       executed command.
  207.  
  208.       In addition, REARJ passes the name of the original archive to
  209.       this command as a command line argument when executing it.  This
  210.       may cause a problem with DOS commands that expect no arguments.
  211.       A workaround would be to install the DOS command in a batch file.
  212.  
  213.      /d - delete the original archive
  214.  
  215.       This option causes REARJ to delete the original archive after a
  216.       successful conversion to the target format.  This option will NOT
  217.       delete read-only archives.
  218.  
  219.      /e - do not return error if no archives were found
  220.  
  221.       This option is used by the internal recursive REARJ.    This option
  222.       will cause REARJ to return a zero exit code if no matching
  223.       archives were found.    Usually, REARJ returns a non-zero exit
  224.       code for this condition.
  225.  
  226.      /f - convert diskette archives
  227.  
  228.       This option is used to facilitate the conversion of archives on a
  229.       diskette.  If you do not have sufficient space on the diskette to
  230.       keep the original archives, you MUST specify the "/d" option as
  231.       in "REARJ A:*.zip /f /d".
  232.  
  233.       This option causes REARJ to build the target archive in the
  234.       CURRENT directory (not the working temporary directory).  After
  235.       verification, REARJ will, if specified, delete the original
  236.       archive and then copy the new archive to the diskette.  You
  237.       should make sure that the current directory does not contain any
  238.       archives before executing REARJ.
  239.  
  240.      /i - check program integrity
  241.  
  242.       This option causes REARJ to validate the REARJ program on disk.
  243.       If you are using a pre-3.0 MS-DOS revision, you will have to
  244.       specify the full program name as in "REARJ /i\util\rearj.exe".
  245.  
  246.      /l - write conversion data to log file
  247.  
  248.       This option causes REARJ to open a log file and record each
  249.       successful conversion in the log file.  The default log filename
  250.       is REARJ.LOG.  You can specify the log filename as in
  251.       "REARJ /lfilename *.ZIP".  If the log file already exists, REARJ
  252.       will append logging data to it.
  253.  
  254.      /o - overwrite existing target archive
  255.  
  256.       This switch is used to delete already existing target archives.
  257.       This is not used for updating archives.  Use the /u option for
  258.       updating an archive.
  259.  
  260.      /q - query for each archive to convert
  261.  
  262.       This switch causes REARJ to pause and prompt the user for
  263.       permission to convert individual archives.  Note that REARJ will
  264.       not prompt when skipping archives.
  265.  
  266.      /r - recurse through subdirectories
  267.  
  268.       This switch causes REARJ to look for archives in all included
  269.       subdirectories as well as in the current directory.  This switch
  270.       allows the user to convert all archives on a hard disk with one
  271.       command.
  272.  
  273.      /s - skip verify of file count and total size
  274.  
  275.       Skip the overhead of the file count and total size verification
  276.       process.  This verification costs an extra extraction, but this
  277.       check is worth the time, especially when converting a large
  278.       number of archives.
  279.  
  280.      /t - specify the target archive type
  281.  
  282.       The default target archive format is normally ARJ.  This can be
  283.       changed by building an external REARJ.CFG file.  The first
  284.       archive type is always the default format.  To override the
  285.       default format, the user can specify the /t switch as in
  286.       "REARJ *.ZIP /tlzh".    The previous example has specified that LZH
  287.       is the target format.
  288.  
  289.      /u - allow update of archive with backup
  290.  
  291.       This switch is used to re-archive an archive, possibly to take
  292.       advantage of improved compression.  The original archive is
  293.       backed up by renaming it with the backup suffix which by default
  294.       is "BAK".  You may specify another backup suffix with the /u
  295.       option as in "REARJ *.ARJ /uar$" where the backup suffix is
  296.       "ar$".  Since this option creates a brand new archive, archive
  297.       comments will be lost.  Do NOT specify a "." in the suffix.
  298.  
  299.      /v - execute configured command on extracted files
  300.  
  301.       This switch is used to execute a configure command on the files
  302.       extracted from the original archive.    The intent is to allow
  303.       virus scanning of the archive contents.  The command must be
  304.       specified in the REARJ.CFG file.
  305.  
  306.       The command may be placed in the REARJ.CFG file by inserting one
  307.       line ahead of the archive commands.  The line must start with the
  308.       word "VIRUS" followed by a blank and the external command.
  309.  
  310.       Example:  VIRUS scan /nomem *.*
  311.  
  312.       If the invoked command returns a non-zero error code, REARJ will
  313.       skip the conversion of that archive and log the error as code 13.
  314.  
  315.       REARJ *.* /v
  316.  
  317.      /w - set working directory
  318.  
  319.       By default, REARJ creates a temporary working directory in the
  320.       current directory.  This option allows you to specify the working
  321.       directory.  The working directory must be EMPTY when invoking
  322.       REARJ.  This directory is used to hold the extracted files.
  323.       This is NOT considered the current directory for /f use.
  324.  
  325.       Example:  REARJ *.* /wd:\
  326.  
  327.       This option helps solve the absolute pathname extraction problem
  328.       that some archivers have.  If you set the working directory to an
  329.       empty root directory, the archiver can extract to the root and
  330.       REARJ will be able to find all of the files to re-archive them.
  331.       However, this option will NOT work for internal archives that
  332.       extract to absolute paths.
  333.  
  334.      /x - exclude filenames or wildnames from the conversion process
  335.  
  336.       You can exclude one or more files from the conversion process.
  337.       The filenames can contain wildcards.
  338.  
  339.       REARJ *.ZIP /xONE.ZIP /xTWO.ZIP
  340.  
  341.      /z - simulate conversion process
  342.  
  343.       This switch causes REARJ to simulate the conversion process.    No
  344.       archives will be extracted, built, or deleted.
  345.  
  346.  
  347.      EXAMPLES:
  348.  
  349.      REARJ *.ZIP           this converts all ZIP files in the current
  350.                    directory to ARJ files.
  351.  
  352.      REARJ *.ZIP *.ARC           this converts ZIP and ARC files to ARJ
  353.                    files.
  354.  
  355.      REARJ SOFT.ZIP           this converts only SOFT.ZIP to SOFT.ARJ.
  356.  
  357.      REARJ A:*.ZIP /f /d       convert ZIPs on A drive with deletion of
  358.                    each original archive upon successful
  359.                    conversion.
  360.  
  361.      REARJ *.ARC /r           this converts all ARC files in the current
  362.                    directory and in subdirectories of the
  363.                    current directory to ARJ files.
  364.  
  365.      REARJ SOFT.ARJ /tZIP       this converts SOFT.ARJ to SOFT.ZIP.
  366.  
  367.      REARJ *.ARJ /u           re-archive all ARJ archives.
  368.  
  369.      REARJ *.* /v /wd:\        re-archive all archives and execute
  370.                    configured command on extracted files
  371.                    using d:\ as the temp directory.
  372.  
  373.  
  374.      EXTERNAL CONFIGURATION FILE
  375.  
  376.      REARJ comes with a configuration file, REARJ.CFG, which supports
  377.      conversion between the ARJ, ARC, LZH, PAK, ZIP, DWC, LZS, HYP, and ZOO
  378.      formats.  The commands PKPAK and PKUNPAK are used for ARC files.  The
  379.      command LHA is used for LZH files.  You can change these defaults by
  380.      editing the configuration file.
  381.  
  382.      The format of the configuration file is fairly simple.
  383.  
  384.      The first line can optionally specify an external command to be
  385.      executed by REARJ when the "/v" option is selected.  This line must
  386.      start with the word "VIRUS" minus the quotes, followed by a space,
  387.      followed by the external command.    The external command MUST contain
  388.      a fully specified pathname for security reasons.
  389.  
  390.      Example:  VIRUS C:\BIN\SCAN /nomem *.*
  391.  
  392.      If you do not want to configure this item, DO NOT insert a blank line.
  393.  
  394.      Each archive format requires four lines in the file.
  395.  
  396.      The first line is the format suffix.
  397.  
  398.      The second line is the archive ADD command with a %s in the place of
  399.      the archive name.    Any other percent signs in the command must be
  400.      preceded by "\" as in "\%".  The ADD command should support directory
  401.      inclusion and reading of hidden and/or system files.  REARJ will parse
  402.      this command line using the space character as the token separator.
  403.  
  404.      If your ADD command requires DOS piping as the ZOO archiver requires,
  405.      you must precede the ADD command with the text "COMMAND /C ".
  406.  
  407.      Example:  ARJ a -a -r -jt %s
  408.            COMMAND /C STUFF *.* | ZOO aI %s
  409.  
  410.      The third line is the archive EXTRACT command with a %s in the
  411.      place of the archive name.  Any other percent signs in the command
  412.      must be preceded by "\" as in "\%".  The EXTRACT command should
  413.      support directory recreation if the archive contains directories.
  414.      The extraction of directories must be to child directories within the
  415.      current directory.  REARJ will parse this command line using the space
  416.      character as the token separator.
  417.  
  418.      If your EXTRACT command requires DOS piping, you must precede the
  419.      EXTRACT command with the text "COMMAND /C ".  Beware that command exit
  420.      codes are not passed back to REARJ when using COMMAND /C.
  421.  
  422.      The fourth line contains the letters "A" and/or "D" or no letters.
  423.      The "A" stands for the ability to process files with the hidden and/or
  424.      system attribute.    The "D" stands for full support of directory trees
  425.      within archives.  No letters (blank line) stands for no support for
  426.      hidden or system files or for archive containing directories.
  427.  
  428.      There must be NO EXTRA blank lines or comments in the file.  You may
  429.      use leading blanks for clarity.
  430.  
  431.      See the supplied REARJ.CFG for the current configuration.
  432.  
  433.      If you use a different archiver program, you will need to either
  434.      rename the program to one of the supported ones or you will need to
  435.      modify the installed REARJ.CFG file.
  436.  
  437.      If your original archive format supports extraction to absolute
  438.      directory paths as opposed to relative directory paths and you have
  439.      such archives containing absolute paths, you should not put directory
  440.      extraction in the REARJ.CFG file unless you use the /w option to set
  441.      the working directory to an empty root directory.
  442.  
  443.      You can add comment handling to the ARJ command by adding the
  444.      "-zcomment.txt" option.  This is supported at ARJ 2.20 and above.
  445.  
  446.  
  447.      LOG FILE DATA
  448.  
  449.      When logging is enabled, REARJ will log the action on each selected
  450.      file.  For successful conversions, REARJ logs the date-time, target
  451.      archive type, original archive size, new archive size, bytes saved,
  452.      and original archive name.
  453.  
  454.      When selected files are skipped for any reason, REARJ will log an
  455.      entry in the log file (when logging is enabled) which specifies the
  456.      reason code for skipping the file.  The following are the codes:
  457.  
  458.      1    = File not found
  459.      2    = File is not a configured archive type
  460.      3    = Target archive already exists
  461.      4    = Not enough disk space
  462.      5    = User skipped or user did not select update option
  463.      6    = UNPACK error
  464.      7    = PACK error
  465.      8    = Target cannot support directories
  466.      9    = Wrong file count
  467.      10 = Wrong total size
  468.      11 = Internal archive REARJ error
  469.      12 = Rename archive error
  470.      13 = Invoked /v command error (found a virus?)
  471.  
  472.  
  473.      LICENSE POLICY:
  474.  
  475.      For personal (not at the office) use, the shareware version of
  476.      REARJ may be freely used only by ARJ users.  An ARJ user is one who
  477.      uses ARJ on a regular basis.  Others who wish to use REARJ must
  478.      purchase a registration or site license for the ARJ package.
  479.  
  480.      Please refer to the LICENSE.DOC for more license information.
  481.  
  482.  
  483.      TECHNICAL SUPPORT:
  484.  
  485.      Please report any bugs.  I will TRY to fix them.  See ARJ.DOC for
  486.      details on how to contact me.
  487.  
  488.  
  489.      HISTORY:
  490.  
  491.      2.30 - Created registered version of REARJ.
  492.  
  493.      2.25 - Added pathname requirement for VIRUS configuration option.
  494.  
  495.      2.24 - Fixed /f /d /u processing when updating an archive.
  496.  
  497.      2.23 - Fixed /z processing with /f option.
  498.         Added -jg+ to ARJ in REARJ.CFG
  499.  
  500.  
  501.      end document
  502.  
  503.